#include <iostream>
#include <utility>
#include <vector>
#include <string>
 
int main(){
	std::string str = "Hello";
    std::vector<std::string> v;
    std::cout << "before copy,str is\""<<str<<"\",";
    std::cout << "point address is " <<&str<<"\n";
    //调用常规的拷贝构造函数，新建字符数组，拷贝数据
 
    v.push_back(str);
    //调用移动构造函数，掏空str，掏空后，最好不要使用str
    v.push_back(std::move(str));
    std::cout << "After copy, str is \"" << str << "\",";
    std::cout << "point address is  \"" << &str << "\"\n";
    std::cout << "The contents of the vector are \"" << v[0]
                                         << "\", \"" << v[1] << "\"\n";
    std::cout << "The contents of the vector address are \"" << &v[0]
                                         << "\", \"" << &v[1] << "\"\n";

    system("pause");
	return 0;
}